Ext.define("Mypocket.view.home.Splash", {
    extend: "Ext.Container",
    id: "splashScreen",
    requires: ["Mypocket.view.legislator.List", "Mypocket.view.Settings"],
    config: {
    	title: '首页',
		iconCls: 'home',
		autoDestroy: false,
        layout: {
            type: "card",
            animation: {
                type: 'flip'
            }
        },
        items: [{
            xtype: "toolbar",
            data: "null",
            docked: "top",
            id: "splashToolbar",
            title: "选择区域",
            items: [{
                id: "settingsBtn",
                text: "选择市区"
            }]
        },
        {
            xclass: "Mypocket.view.legislator.List"
        },
        {
            xclass: "Mypocket.view.Settings"
        }]
    },
    animateTo: function(dir) {
        Ext.getCmp('viewport').getLayout().setAnimation({
            duration: 300,
            easing: 'ease-in-out',
            type: 'slide',
            direction: dir
        });
    }
});